home *** CD-ROM | disk | FTP | other *** search
/ Total Web Page (Professional Suite) / Total Web Page 99.iso / CGI / RM_CONT_M.PL < prev    next >
Perl Script  |  1996-06-03  |  845b  |  28 lines

  1. #!/usr/bin/perl
  2. # Remove Control M's ^M
  3. # Matt Wright           (mattw@worldwidemart.com)
  4. # Version 1.0           (http://worldwidemart.com/scripts/)
  5. # Created on: 10/95    Last Modified on: 12/7/95
  6.  
  7. while (<>) {
  8.    $_ =~ s/\cM\n/\n/g;
  9.    print $_;
  10. }
  11.  
  12.  
  13. # To use this script, type:
  14. # rm_cont_m.pl infile > outfile
  15.  
  16. # This script will remove those pesky control M's off of the end of your
  17. # scripts after you have edited them in DOS or Windows.
  18.  
  19. # The infile should be the name of the file you want to remove control 
  20. # m's from and the outfile should be a different file where you want to 
  21. # redirect the output to.  Don't use the infile as the outfile or it will
  22. # remove your original file.  :-(
  23.  
  24. # If you do not specify an outfile, then the script will print the contents
  25. # to the screen.
  26.  
  27. # Ths script has no error checking, and is very simple.
  28.